<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
       *{
           margin: 0;
           padding: 0;
       }
       .vv{
           width: 100px;
           height: 100px;
           background-color: aqua;
       }
    </style>
    <script>
       window.onload=function(){
        //    var vv=document.querySelector('.vv');
           var startX,startY,moveX,moveY,distanceX,distanceY;
           document.addEventListener('touchstart',function(e){
            startX=e.targetTouches[0].clientX;
            startY=e.targetTouches[0].clientY;
           });
           document.addEventListener('touchmove',function(e){
               moveX=e.targetTouches[0].clientX;
               moveY=e.targetTouches[0].clientY;
               distanceX=moveX- startX;
               distanceY=moveY- startY;
               e.target.style.transform='translate('+ distanceX+'px,'+ distanceY+'px)';
           })
       }
    </script>
</head>
<body>
    <div class="vv">事件委托</div>
    <div class="vv">事件委托</div>
    <div class="vv">事件委托</div>
    <div class="vv">事件委托</div>
    <div class="vv">事件委托</div>
</body>
</html>
